package com.common.core.exception;

import lombok.Getter;

/**
 * @auther zhangwj
 * @date 2021/7/26 上午11:46
 */
@Getter
public abstract class AbstractException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private String errCode;

    public AbstractException(String errMsg) {
        super(errMsg);
    }

    public AbstractException(String errCode, String errMsg) {
        super(errMsg);
        this.errCode = errCode;
    }

    public AbstractException(String errMsg, Throwable e) {
        super(errMsg, e);
    }

    public AbstractException(String errCode, String errMsg, Throwable e) {
        super(errMsg, e);
        this.errCode = errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }
}
